home *** CD-ROM | disk | FTP | other *** search
- Path: news.cis.nctu.edu.tw!usenet
- From: William Boyer <boyer.w@ghc.org>
- Newsgroups: comp.lang.apl,comp.lang.asm.x86,comp.lang.c,comp.lang.c++,comp.os.ms-windows.programmer.networks
- Subject: Re: API Call to Acquire Ethernet Address
- Date: Mon, 26 Feb 1996 16:10:25 -0800
- Organization: Group Health
- Message-ID: <31324BF1.68E5@ghc.org>
- References: <4f0bml$lvd@noc.tor.hookup.net> <4fnm1j$52@ns2.emirates.net.ae> <4gi2fg$bcq@news.hal.com> <4glnnu$bb3@dawn.mmm.com>
- NNTP-Posting-Host: @billy.ghc.org
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (Win95; I)
-
- Aaron Luft wrote:
- >
- > I use the NetBIOS get adapter status command passing a parameter of "*", it
- > takes all of ten lines of code or so, but you do have to have NetBIOS support.
- > I have done this with OS2, WIN NT, WFW, and DOS. I have never done this on a
- > UNIX machine, but I think some do support NetBIOS.
- >
- > Your other option (in DOS environments) is doing a "cheap" bind when the
- > device driver loads and make use of NDIS or OCX calls, but this is painful
- > (especially if all you need is a MAC address).
- >
- > Opinions expressed herein are my own and may not represent those of 3M.
-
- If you have the Netware VLM loaded, you can ask it. This is how I do it here.
-
- int FAR PASCAL GetMacAddress(LPSTR pszMacAddr)
- {
- union REGS regs;
- int i = -1;
-
- regs.h.ah = 0xEE;
- int86(0x21, ®s, ®s);
- i = sprintf(pszMacAddr,"%0.4X%0.4X%0.4X",regs.x.cx, regs.x.bx, regs.x.ax);
- return 0;
- }
-
-
- Bill Boyer
- Group Health
-